<?php
namespace app\index\model;

use think\Model;
use think\model\concern\SoftDelete;

class Blog extends Model 
{
    use SoftDelete;
    protected $deleteTime = 'delete_time';
    
    public static function show($list_rows = '10'){

    	$list = Blog::where('status',1)
            ->order('id', 'desc')
            ->paginate($list_rows);
            return $list;
    }
    public static function view($id = '1'){

        // 取出主键为1的数据
		$view = Blog::get($id);
            return $view;
    }

}